﻿package planningsbord_v4.gui {
	
	import flash.display.Sprite;
	
	public class InfoPanel extends Sprite {
		
		private var planningskaart:PlanningsKaart;
		private var _x:Number;
		private var _y:Number;
		private var _width:Number;
		private var _height:Number;
		
		public function InfoPanel( dePlanningskaart:PlanningsKaart, xPos:Number, yPos:Number, breedte:Number, hoogte:Number ):void {
			planningskaart = dePlanningskaart;
			this._x = xPos;
			this._y = yPos;
			this._width = breedte;
			this._height = hoogte;
			tekenPanel();
			addPatientInfo();
		}
		
		private function tekenPanel():void {
			
			// teken body
			this.graphics.lineStyle( 3, 0x000000, 1 );
			this.graphics.beginFill( 0xFFFFFF );
			this.graphics.drawRect( _x, _y, _width, _height );
			this.graphics.endFill();
		}
		private function addPatientInfo():void {
			//TODO: Voeg tekstvelden toe met de patient gegevens
		}
		
		override public function get width():Number {
			return _width;
		}
		override public function set width(nieuweWaarde:Number):void {
			_width = nieuweWaarde;
			tekenPanel();
		}
		override public function get height():Number {
			return _height;
		}
		override public function set height(nieuweWaarde:Number):void {
			_height = nieuweWaarde;
			tekenPanel();
		}
		override public function get x():Number {
			return _x;
		}
		override public function set x(nieuweWaarde:Number):void {
			_x = nieuweWaarde;
			tekenPanel();
		}
		override public function get y():Number {
			return _y;
		}
		override public function set y(nieuweWaarde:Number):void {
			_y = nieuweWaarde;
			tekenPanel();
		}
	
	}
}